Extract contructor for Package where only root_package is needed
authorCarol (Nichols || Goulding) <carol.nichols@gmail.com>
Sat, 19 Sep 2015 17:50:14 +0000 (13:50 -0400)
committerCarol (Nichols || Goulding) <carol.nichols@gmail.com>
Sun, 20 Sep 2015 03:19:16 +0000 (23:19 -0400)
commit0d9eac6e8ff6da0e3c8d49e8b29a9cad3b325851
tree71a13e700d391b1c6cacf4e57b69cdeafa96e771
parent339146def15b9d771d8ba3fdd7bdbaabca9b03fb
Extract contructor for Package where only root_package is needed

There are many places where both source and its root_package() are used,
but in these places, the only reason the source is created is to get to
the root_package.

This just extracts the source creation into a Package constructor for
now, but I think this can be made to not use source at all.
src/cargo/core/package.rs
src/cargo/ops/cargo_clean.rs
src/cargo/ops/cargo_doc.rs
src/cargo/ops/cargo_pkgid.rs
src/cargo/ops/cargo_run.rs
src/cargo/ops/registry.rs